<?php
/** 
 * $Source: /cvsroot/pn-commerce/pn-commerce/pntemplates/plugins/function.pncGetShipMethodOption.php,v $
 * $Author: pcornelissen $
 * $Revision: 1.2 $
 * $Date: 2003/12/08 12:09:47 $
 *
 * Type: Function
 *
 * asks the SM API for the option html code and returns it
 * @return string url
 */
function smarty_function_pncGetShipMethodOption($params, &$smarty)
{
    extract($params);

    if( !$ShipMethod )
    {
        return "*** error: missing parameter 'ShipMethod' ***";
    }
    
    if( pnModAPILoad( 'pncommerce', $ShipMethod ) )
    {
        return pnModAPIFunc( 'pncommerce', $ShipMethod, 'showoption',
	        				 array( 'BSM'   => $lastusedSM ) );
    }
    else
    {
        return "*** error: could not open $ShipMethod API file ***";
    }
}
?>
